#########################
#   Author : Leon yu    #
#   Date : 2025/06/14   #
#   Id : SM2772         #
#########################
from datetime import datetime
from dbResps.queryStoreSalesReport import *
from apiRespsAnalyze.queryStoreSalesReportResultFromApi import *
from compareResult.compareUtils import Compare

# 非当天 6/12号
startTime = 1718125200000
endTime = 1718211599000


getQueryStoreSalesReportFromDB_Result = getQueryStoreSalesReportFromDB(startTime, endTime)
getQueryStoreSalesReportFromApi_Result = queryStoreSalesReportResult(startTime, endTime)
del getQueryStoreSalesReportFromApi_Result['payMethodReport']
del getQueryStoreSalesReportFromApi_Result['payTotalAmount']



if __name__ == "__main__":
    compareResult = Compare.compare(getQueryStoreSalesReportFromDB_Result, getQueryStoreSalesReportFromApi_Result)
    if compareResult:
        print('compare success')
    else:
        print('compare fail')
        print(getQueryStoreSalesReportFromDB_Result)
        print(getQueryStoreSalesReportFromApi_Result)